package org.tlipoca.smarticle.client;

import org.genntii.smcommon.result.Result;
import org.genntii.smdomain.doc.VO.ArticleTagDocVO;
import org.genntii.smdomain.entity.ArticleTag;
import org.genntii.smdomain.vo.ArticleTagVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.Map;

@FeignClient("sm-articleTag")
public interface ArticleTagClient {

    @GetMapping("/article_tag/exists")
    Result<Boolean> articleTagListExists(@RequestParam("tagIds")ArrayList<Long> tagIds);

    @GetMapping("/article_tag/tagIds")
    Result<ArrayList<ArticleTagVO>> getArticleTagListByTagId(@RequestParam("tagIds")ArrayList<Long> tagIds);

    @GetMapping("/article_tag/tagdocvo")
    Result<ArrayList<ArticleTagDocVO>> getArticleTagDocVOLIstByTagId(@RequestParam("tagIds")ArrayList<Long> tagIds);

    @PostMapping("/article_tag/batch")
    Result<Map<String , ArrayList<ArticleTagVO>>> getArticleTagListByArticleTagMap(@RequestBody Map<String, ArrayList<Long>> articleTagMap);
}
